﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ViewRidgeAssistant
{
    public partial class ReportViewer : Form
    {
        public ReportViewer()
        {
            InitializeComponent();
            this.browser.DocumentText = "This is default (empty) report viewer form constructor.";
        }

        public ReportViewer(String report)
        {
            InitializeComponent();
            this.browser.DocumentText = report;
            //this.browser.ShowPrintDialog();
        }

        private void отчетToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void ReportViewer_Load(object sender, EventArgs e)
        {

        }

        private void mi_print_Click(object sender, EventArgs e)
        {
            this.browser.ShowPrintDialog();
        }

        private void mi_save_Click(object sender, EventArgs e)
        {
            this.browser.ShowSaveAsDialog();
        }

        private void mi_edit_Click(object sender, EventArgs e)
        {
            MessageBox.Show("В настоящий момент функция редактирования\nотчета недоступна!");
        }

        private void mi_close_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void form_closed(object sender, FormClosedEventArgs e)
        {
            this.Dispose();
        }
    }
}
